package com.stud.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.stud.seckill.entity.OrderEntity;
import com.stud.seckill.entity.SeckillOrderEntity;

/**
 * <p>
 * 秒杀订单表 服务类
 * </p>
 *
 * @author Libra
 * @since 2024-03-30
 */
public interface SeckillOrderService extends IService<SeckillOrderEntity> {

    /**
     * 查询结果
     * @param userId
     * @param goodsId
     * @return
     */
    Long getResult(Long userId, Long goodsId);

    /**
     * 生成抢购订单
     * @param userId
     * @param goodsId
     */
    OrderEntity saveOrder(Long userId, Long goodsId);

    /**
     * 初始化订单
     */
    void initOrder();

}
